< previous page page_138 next page >

Page 138
The Class Builder enables you to create a new class or a new collection. For this example, click the Add New Class button to add a new class to the project using the Class Module Builder dialog box as shown in Figure 5.4. On the Properties tab, change the class name to GetAge, then if you want, you can add a description of this class in the Description field on the Attributes tab.
12181-0138a.gif
Figure 5.4.
Creating a new class definition.
Click OK to actually add the class definition. Congratulations, you have successfully created a class!
However, this class doesn't do anything because it has no properties, methods, or events. The next step is to add the definitions for the remaining objects of the class. To add any of the objects, you can right-click the class name in the Classes list to display a drop-down menu, then select New to display the list of objects you can create (see Figure 5.5).
Select Property to display the Property Builder dialog box (see Figure 5.6), which you will use to define each of the properties required for the class.
For each property, enter the name and select the correct data type as previously listed in Table 5.2. When you have finished this task, the Class Builder dialog box should look like the one in Figure 5.7.

 
< previous page page_138 next page >

If you like this book, buy it!